def view():
        f=open('Data.txt','r+')
        data_r=f.read().split()
        f.close()
        if data_r==[]:
            input('Data文件没有数据...')
        return True
        if 'id'==(input('使用id查询还是name查询:\n')):
            try:
                id=(input('\n请输入id:\n'))
                for i in range(len(data_r)):
                    if id==eval(data_r[i])[0]:
                        print('\nid:{}   姓名:{}   性别:{}   年龄:{}   身高:{}   体重:{}   班级:{}'.format(eval(data_r[i])[0],eval(data_r[i])[1],eval(data_r[i])[2],eval(data_r[i])[3],eval(data_r[i])[4],eval(data_r[i])[5],eval(data_r[i])[6]))
                input('\n回车退出')
            except:
                print('\nerror')
        else:
            try:
                name=input('\n请输入姓名:\n')
                for i in range(len(data_r)):
                    if name==eval(data_r[i])[1]:
                        print('\nid:{}   姓名:{}   性别:{}   年龄:{}   身高:{}   体重:{}   班级:{}'.format(eval(data_r[i])[0],eval(data_r[i])[1],eval(data_r[i])[2],eval(data_r[i])[3],eval(data_r[i])[4],eval(data_r[i])[5],eval(data_r[i])[6]))
                input('\n回车退出')
            except:
                print('\nerror')
